<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
	<script src="js/smart.js"></script>
</head>
<body>
	
</body>
	<script type="text/javascript">
		var arr = [
			{"name":"小米","ip":"m123"},
			{"name":"华为","ip":"m124"},
			{"name":"apple","ip":"m125"}
		]
		console.log(arr)
		//取值 获取Cookie中所存的ip号， 然后获取对应数据
		for(var i = 0;i<arr.length;i++){
			if(arr[i].ip == getCookie("ip"+arr[i].ip)){
				console.log(arr[i].name) //获取对应数据
				//创建购物车列表
			}
		}
	</script>
</html>